package thread.threaddemo;

/**
 * @Author: wenjingyuan
 * @Date: 2022/11/01/20:30
 * @Description:Runnable 匿名内部类
 */
public class ThreadDemo5 {
    public static void main(String[] args) {
       //匿名内部类
       Thread thread=new Thread(new Runnable() {
           @Override
           public void run() {
               System.out.println("执行的线程为"+Thread.currentThread().getName());
           }
       }) ;
       thread.start();
    }
}
